package com.itcast.n1_base2;

import java.io.IOException;

/**
 * @program: heima-jvm
 * @description:
 * @author: flyduck
 * @create: 2024-04-11 20:08
 **/
public class Test7_验证自定义String类不会被加载 {
    public static void main(String[] args) throws ClassNotFoundException, IOException {
        ClassLoader classLoader = Test7_验证自定义String类不会被加载.class.getClassLoader();
        System.out.println(classLoader);//sun.misc.Launcher$AppClassLoader@14dad5dc

        Class<?> clazz = classLoader.loadClass("java.lang.String");
        ClassLoader classLoader1 = clazz.getClassLoader();
        System.out.println(classLoader1);//null

        System.in.read();
    }
}
